package com.xinggq.pay.service.pay.channel.yse.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 银盛支付方法枚举
 *
 * @author SunW 2022-05-18
 */
@Getter
@AllArgsConstructor
public enum YseMethodEnum {
  /**
   * 扫码支付
   */
  QR_PAY("ysepay.online.qrcodepay", "https://qrcode.ysepay.com/gateway.do","3.5"),
  /**
   * 微信公众号、小程序支付
   */
  WECHAT_PAY("ysepay.online.weixin.pay", "https://qrcode.ysepay.com/gateway.do","3.5"),
  /**
   * 银盛B2B&B2C收银台支付
   */
  DESK_PAY("ysepay.online.directpay.createbyuser", "https://openapi.ysepay.com/gateway.do","3.5"),
  /**
   * 分账登记
   */
  DIVISION("ysepay.single.division.online.accept",
      "https://commonapi.ysepay.com/gateway.do","3.0"),
  /**
   * 分账退款
   */
  REFUND_SPLIT("ysepay.online.trade.refund.split", "https://openapi.ysepay.com/gateway.do","3.0");

  /**
   * 银盛支付方法
   */
  private final String method;
  /**
   * 网关地址
   */
  private final String gatewayUrl;
  /**
   * 版本
   */
  private final String version;

  public String getMethodResponse() {
    return StrUtil.replace(method, ".", "_") + "_response";
  }
}
